//import './assets/main.css'
import './styles/common.scss'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/styles/element-patch.scss'
import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import cDialog from '@/components/common/dialog.vue'
import queryToolbar from '@/components/common/queryToolbar.vue'
import inputSelect from '@/components/common/inputSelect.vue'
// import cList from '@/components/common/list.vue'


const app = createApp(App)
// app.config.errorHandler = (err: any, vm, info) => {
//   // console.log(err, vm, info)
//   console.error(`全局未捕捉错误`, err, vm, info)
//   // console.error(`全局未捕捉错误：${err.toString()}\n信息：${info}`);
// };

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component("ElIcon" + key, component)
}
app.component("CDialog", cDialog)
app.component("CQueryToolbar", queryToolbar)
app.component("CInputSelect", inputSelect)
// app.component("CList", cList)

app.use(createPinia())
app.use(router)
app.use(ElementPlus, { size: "small" });
app.mount('#app')
